//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.lyq.bean.mySql;

import java.sql.Connection;
import java.sql.PreparedStatement;

public class UpdateC_Sql {
    public UpdateC_Sql() {
    }

    public Boolean updateC_Sql(String No, String time, String place, String credit) {
        (new MysqlLinking()).getLink();
        Connection conn = MysqlLinking.conn;
        Boolean bool = false;
        if (conn != null) {
            try {
                String sql = "update  course set C_Time=?,C_Place=?,C_Credit=? where C_No=? ";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, time);
                ps.setString(2, place);
                ps.setString(3, credit);
                ps.setString(4, No);
                int count = ps.executeUpdate();
                if (count >= 1) {
                    bool = true;
                }
            } catch (Exception var10) {
                Exception e = var10;
                e.printStackTrace();
            }
        } else {
            System.out.println("数据库连接错误！");
        }

        return bool;
    }
}
